Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

423
Views
Google Sheets API resulting in "GoogleAuth is not a constructor" error in Node

I've been trying to set up a node application with the Google Sheets API, but when initializing as per the documentation I get the following error:

TypeError: google.auth.GoogleAuth is not a constructor

Using the below code:

const {google} = require('googleapis');

const auth = new google.auth.GoogleAuth({
    keyFile: 'credentials.json',
    scopes: ['https://www.googleapis.com/auth/spreadsheets']
});

I've tried looking everywhere but haven't been able to find a solution.

To clarify I have installed googleapis with npm in the project as well

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I had the same problem and updating the googleapis library fixed the issue. Run npm i googleapis@latest and try again.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!